package com.hyb.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *  角色权限信息
 * </p>
 *
 * @author hyb
 * @since 2021-12-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tbl_role_permission")
@ApiModel("角色权限信息")
public class RolePermission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "role_permission_id", type = IdType.AUTO)
    @ApiModelProperty("角色权限id")
    private Integer rolePermissionId;
    @ApiModelProperty("角色id")
    private Integer roleId;
    @ApiModelProperty("权限id")
    private Integer permissionId;
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,update = "now()")
    private LocalDateTime updateTime;
    @ApiModelProperty("修改次数")
    @Version
    private Integer version;
}
